package com.qf.service.impl;

import com.qf.mapper.UserMapper;
import com.qf.pojo.Sys_user;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 用户登录校验
     * @param tel 手机号
     * @param password 密码
     * @return
     */
    @Override
    public Sys_user userLogin(String tel,String password) {
        Sys_user user = userMapper.userLogin(tel);
        if(user.getPassword().equals(password)){
            return user;
        }
        return null;
    }
}
